home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / plain / contrib / cassette.tex < prev    next >
Encoding:
Text File  |  1992-08-26  |  7.7 KB  |  201 lines

  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. %
  3. %  cassette.tex (C) Copyright 1991 by David Strip.
  4. %  Permission is granted for non-commercial use.
  5. %  Please send corrections, refinements, etc to drstrip@cs.sandia.gov
  6. %  Flames to \dev\null
  7. %
  8. %  These macros are designed to lay out a label for a standard
  9. %  phillips audio cassette box. See the pictorial layout below.
  10. %
  11. %  In general you will begin with a \artist command. This command
  12. %  takes a single argument and prints it in large boldface on the
  13. %  spine of the cassette. Within this argument the \\ command will
  14. %  create spacing between words. The total blank space on the line
  15. %  is divided equally between the left margin, the right margin, and 
  16. %  each occurance of \\. The most typical use of \\ is to separate the
  17. %  names of different artists appearing on the tape. The \artist command
  18. %  does not need to be repeated if several labels are being made with
  19. %  the same artist.
  20. %
  21. %  The next command is the \title command. This is very similar to the
  22. %  \artist command. It takes a single argument, which is printed on the
  23. %  cassette spine. The \\ command and spacing are the same as in the
  24. %  title command.
  25. %
  26. %  Commands \sideA and \sideB are nearly indentical. They layout the
  27. %  left and right columns, repectively of the face of the cassette. 
  28. %  (These columns are twice the length of the cassette box face, and are
  29. %  intended to be folded in half. These commands also take a single arguement
  30. %  which is then formatted as a paragraph  in the appropriate column. The
  31. %  paragraph formatting has reverse indenting - the first line starts at the
  32. %  margin, subsequent lines are indented. In these commands you can use \\ to
  33. %  end lines (e.g., song titles).
  34. %  For the daring, the arguments to the commands can contain any TeX code
  35. %  (within reason). A few useful tricks for the uninitiated: You can call
  36. %  \centerline{...} to center some text. You can use {\bf ...} to put text in 
  37. %  bold face. \blankline (defined in this file, will leave a blank line.
  38. %  (See the example.)
  39. %
  40. %  The \NR and \noNR switches turn on or off the dolby logo on the spine.
  41. %
  42. %  The \CD command within a \sideA or \sideB command will center the 
  43. %  compact audio disk logo at the point that the command occurs.
  44. %
  45. %  After you have filled in these fields, you actually cause the casette
  46. %  label to be processed with the \cassette-label command, which takes 
  47. %  no arguements.
  48. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  49. %
  50. %      _______________________________________________
  51. %     |                                               |
  52. %     |                                               |
  53. %     |_______________________________________________|
  54. %     |                 \artist                       |
  55. %     |                 \title                        |
  56. %     |_______________________________________________|
  57. %     |                      |                        |
  58. %     |    \sideA            |       \sideB           |
  59. %     |                      |                        |
  60. %     |                      |                        |
  61. %     |                      |                        |
  62. %     |                      |                        |
  63. %     |                      |                        |
  64. %     |                      |                        |
  65. %     |                      |                        |
  66. %     |                      |                        |
  67. %     |                      |                        |
  68. %     |                      |                        |
  69. %     |                      |                        |
  70. %     |                      |                        |
  71. %     |                      |                        |
  72. %     |                      |                        |
  73. %     |                      |                        |
  74. %     |                      |                        |
  75. %     |                      |                        |
  76. %     |                      |                        |
  77. %     |                      |                        |
  78. %     |                      |                        |
  79. %     |______________________|________________________|
  80. %
  81. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  82. % Example
  83. %
  84. %   \artist{Dylan\\Kooper, Bloomfield, Stills}
  85. %   \title{Highway 61 Revisited\\Super Session}
  86. %   \sideA{
  87. %   Like A Rolling Stone\\
  88. %   Tombstone Blues\\
  89. %   It Takes a Lot to Laugh, It Takes a Train to Cry\\
  90. %   From a Buick 6\\
  91. %   Queen Jane Approximately\\
  92. %   Highway 61 Revisited\\
  93. %   Just Like Tom Thumb's Blues\\
  94. %   Desolation Row\\
  95. %   \CD}                                      %original was on CD
  96. %   \sideB{
  97. %   Ballad of a Thin Man\\
  98. %   \blankline                                %leave a blank line
  99. %   \centerline{\bf Bloomfield and Kooper}    %center and bold for subhead
  100. %   Albert's Shuffle\\
  101. %   Stop\\
  102. %   Man's Temptation\\
  103. %   His Holy Modal Majesty\\
  104. %   \blankline
  105. %   \centerline{\bf Stills and Kooper}
  106. %   It Takes a Lot to Laugh, It Takes a Train to Cry\\
  107. %   Season of the Witch\\
  108. %   \CD}
  109. %   \cassette-label                           %Print the label
  110. %
  111. %\end
  112. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  113. %FONTS  Substitute freely to get what you want. These are Nini Billawala's 
  114. %       pandora family, which lends a slightly informal touch.
  115.  
  116. \font\ftnbf=pnb10 scaled \magstep2
  117. \font\rm=pnr10
  118. \font\bf=pnb10
  119.  
  120. %These are two specialty fonts. I hope that you can find them. 
  121. \font\dolby=dolby
  122. \font\cdlogo=cdlogo
  123.  
  124. \tolerance=10000    %Allow very sloppy line breaking.
  125. \nopagenumbers
  126.  
  127. %setup the indentation the way I want it.
  128. \parindent=0.pt
  129. \def\\{\par\hangindent 2em \hangafter 1}
  130.  
  131. %Now grab a few boxes to build the stuff in
  132. \newbox\ART \newbox\TITLE \newbox\ASIDE \newbox\BSIDE \newbox\NRmark
  133.  
  134. \def\sideA#1{\setbox\ASIDE=\vbox to 4.98in{\hsize 1.875in \raggedright 
  135. \vskip \baselineskip \\ \rm #1\vfil}}
  136.  
  137. \def\sideB#1{\setbox\BSIDE=\vbox to 4.98in{\hsize 1.875in \raggedright 
  138. \vskip \baselineskip \\ \rm #1\vfil}}
  139.  
  140. \def\artist#1{
  141. \setbox\ART=\vbox {\def\\{\hfil}\hsize 4.0in \ftnbf \hfil #1\hfil}}
  142.  
  143. \def\title#1{\setbox\TITLE=\vbox {
  144.    \def\\{\hfil}
  145.    \hsize 4.0in \hfil \rm #1 \hfil}}
  146.  
  147.  
  148. %These next two may very likely need some munging with, since there obviously 
  149. %no such thing as a standard font for the logos. In each case there is a
  150. %single letter right after the font change command that specifies the mapping
  151. %of the character in the font. Change that if you need.
  152.  
  153.  
  154. \def\NR{\setbox\NRmark=\vbox {\hbox to 4in {\hfil \dolby E\hskip 2pt} \vskip 2pt}}
  155. \def\noNR{\setbox\NRmark=\vbox to 10pt{}}
  156.  
  157. \def\CD{\vfill\centerline{{\cdlogo C}}\vskip 1pc}
  158.  
  159. \def\blankline{\vskip\baselineskip}
  160.  
  161. %Noise reduction logo is enabled by default.
  162. \NR
  163.  
  164. \def\cassette-label{%
  165.  
  166. %My driver does not do landscape, so I can only do one label per page.
  167. %If you can do landscape, you might want to remove this centerline, and
  168. %adjust the page size parameters to do two-up. I just cut a sheet of
  169. %paper in half and print one at a time.
  170.  
  171. \centerline{
  172. \hbox{
  173.    \vrule height6.0in width.01in
  174.    \vbox to 6.0in{\vfil                  %this seems to be necessary to pick
  175.       \hrule width4in height.01in        %   for round-off in the decimals.
  176.       \vskip .49in
  177.       \hrule width4.0in height.01in
  178.       \vbox to .49in {\vfil
  179.           \copy\ART   %artist name
  180.           \vfil
  181.           \box\TITLE   %album titles
  182.           \vfil
  183.           \vskip -\ht\NRmark
  184.           \box\NRmark
  185.           }
  186.        \hrule width4.0in height.01in
  187.        \hbox to 4.0in{
  188.           \hskip .06in
  189.           \box\ASIDE        %side A
  190.           \hfil
  191.           \vrule height4.98in width.01in
  192.           \hfil
  193.           \box\BSIDE        %side B
  194.           \hskip .06in
  195.           }
  196.        \hrule width4.0in height.01in
  197.        }\vrule height 6.0in width.01in
  198.    }
  199. }}
  200.  
  201.